Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Scripting Additions Guide /
Chapter 2 - Scripting Addition Commands / Command Definitions
/


Log

The Log command displays a specified string between comment characters
(* and *) in the Script Editor's Event Log window. For more information about the Log Events window, see Start Log.

Unlike most other scripting additions, the Log command is built into the AppleScript extension. It does not have a separate file in the Scripting Additions folder.

SYNTAX
log stringToLog
PARAMETER
stringToLog
An expression that evaluates to a string or to a value that can be coerced to a string. The resulting string is displayed in the Event Log window.
Class: String
RESULT
None

EXAMPLE
log "This string appears in the Log Events window"
After running the preceding script, this text appears in the Log Events window:

(* This string appears in the Log Events window" *)
NOTES
The Log command works even if logging has not been turned on with the Start Log command or has been turned off with the Stop Log command. If logging is turned off before the Log command is sent, it will still be turned off after the Log command is sent.

ERROR
Error
number
Error message
-1700Can't make some data into the expected type.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
18 DEC 1996